{extend name="public:layout" /}
{block name="title"}添加{$moudleName}{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li>
                    <i class="fa fa-hand-o-right"></i>
                    <a href="{:url('index',['mid'=>2,'cid'=>$Request.param.cid])}">客户列表</a>
                </li>
                <li class="active">添加{$moudleName}</li>
            </ol>
        </div>
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form">
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">客户id</label>
                    <div class="col-sm-4">
                        {:widget('common/Form/custombox',['customer_id','','widget|common/Form/custombox|select:customer:aid,title::===请选择=== '])}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">联系人姓名</label>
                    <div class="col-sm-10">
                        <input class="form-control" type="text" placeholder="" name="title" value="" datatype="*" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">与客户关系</label>
                    <div class="col-sm-4">
                        {:widget('common/Form/custombox',['nexus','','widget|common/Form/custombox|select:dict:dict_name,dict_name:type_id=108'])}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">性别</label><div class="col-sm-4"><label class="radio-inline i-checks"><input type='radio' name="sex" value="0" checked/> 不详</label><label class="radio-inline i-checks"><input type='radio' name="sex" value="1" /> 男</label><label class="radio-inline i-checks"><input type='radio' name="sex" value="2" /> 女</label></div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">联系电话</label>
                    <div class="col-sm-4">
                        <input class="form-control" type="text" placeholder="" name="telphone" value="" datatype="*" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">备注</label>
                    <div class="col-sm-10">
                        <textarea class="form-control" rows="3" name="remarks" ></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">排序</label>
                    <div class="col-sm-4">
                        <input class="form-control" type="text" placeholder="" name="sort" value="0" datatype="*" />
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary" id="btnSub" type="button">保存</button>
                        <a href="{:url('index',['mid'=>$Request.param.mid])}" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
        formatDate();
        ajaxSubForm('#btnSub');
    });
</script>
{/block}